package com.ruoyi.oa.domain;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 行政组 manage_group
 * 
 * @author ruoyi
 */
public class ManageGroup extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 行政组序号 */
    private Long groupId;

    /** 行政组编码 */
    private String groupCode;

    /** 行政组名称 */
    private String groupName;

    /** 行政组排序 */
    private String groupSort;

    /** 状态（0正常 1停用） */
    private String status;

    /** 组长 */
    private String leaderId;

    private SysUser leader;

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    @NotBlank(message = "行政组编码不能为空")
    @Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符")
    public String getGroupCode() {
        return groupCode;
    }

    public void setGroupCode(String groupCode) {
        this.groupCode = groupCode;
    }

    @NotBlank(message = "行政组名称不能为空")
    @Size(min = 0, max = 50, message = "行政组名称长度不能超过50个字符")
    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    @NotBlank(message = "显示顺序不能为空")
    public String getGroupSort() {
        return groupSort;
    }

    public void setGroupSort(String groupSort) {
        this.groupSort = groupSort;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getLeaderId() {
        return leaderId;
    }

    public void setLeaderId(String leaderId) {
        this.leaderId = leaderId;
    }

    public SysUser getLeader() {
        return leader;
    }

    public void setLeader(SysUser leader) {
        this.leader = leader;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("postId", getGroupId())
            .append("postCode", getGroupCode())
            .append("postName", getGroupName())
            .append("postSort", getGroupSort())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
